home *** CD-ROM | disk | FTP | other *** search
/ Aminet 24 / Aminet 24 (1998)(GTI - Schatztruhe)[!][Apr 1998].iso / Aminet / dev / e / AEPD24.lha / EPD24 / Amiga_E-Programme / FVList / FVLIST.Doc next >
Text File  |  1995-02-24  |  2KB  |  84 lines

  1. Hello fellow E-users,
  2.  
  3. Here's another Object oriented class (they're growing out of the
  4. windows lately :) for you to enjoy, use, abuse, whatever...
  5.  
  6. It's a kind of linked list.
  7. No wait!!! I hear you mumbling already...
  8. But this one is no ordinary linked list.  It's a bit more efficient
  9. than the usual stuff.
  10. Instead of holding a speech about the advantages, I'll give you the
  11. structure, so you can figure out some things for yourself.
  12.  
  13. The main handle of the list is an FVList object, which holds no node
  14. data, but simply list-information:
  15.  
  16. it has:
  17.     child   -> the first node
  18.     parent  -> NIL, naturally
  19.     root    -> itself
  20.     tail    -> the last node, for adding nodes fast
  21.  
  22. a node is of the type FVNode, which holds no data (you should derive
  23. data-holding nodes for yourself)
  24.  
  25. it has:
  26.     child   -> next node
  27.     parent  -> previous node (or root for first node)
  28.     root    -> the root, the FVList handle
  29.  
  30. member functions implemented (hopefully bug-free) are:
  31.  
  32. - make(PTR TO fvlist) of fvnode
  33.     a constructor that initialises an fvnode
  34.  
  35. - make(dummyvalue) of fvlist
  36.     a constructor that initialises the root fvlist
  37.  
  38. - the root fvlist can be destructed using
  39.     END root     (assuming root is the PTR TO fvlist)
  40.   , which will destruct all linked nodes, free their memory and free
  41.     the root itself including it's memory
  42.  
  43. - free() of fvnode
  44.     frees the node you call it with and all it's children, updates
  45.     the tail of the root and some other stuff, so that the list is
  46.     always valid. (I call this an amputation :)
  47.  
  48. - delete() of fvnode
  49.     discards a node from the list, linking together the pieces it
  50.     left behind, as if that node never existed. memory is freed for
  51.     that node, etc.
  52.  
  53. - giveChild() of fvnode,fvlist
  54.     echo the child
  55.  
  56. - giveParent() of fvnode,fvlist
  57.     echo the parent
  58.  
  59. - giveTail()
  60.     guess what...
  61.  
  62. - some adding function too
  63.  
  64.  
  65. Hope you do something useful with it.
  66.  
  67. In the possible case that you encounter some bug(s) in it, I'd like
  68. to hear from it definitely!
  69. I tested it, and it seemed to work fine, but I wouldn't bet on it I
  70. made no mistake :)
  71.  
  72. Have fun,
  73.  
  74. Frank,
  75. hi910097@beta.ufsia.ac.be
  76.  
  77.                              \|/
  78.                              @ @
  79. /------------------------oOO-(_)-OOo-------------------------------\
  80. |                             U                                    |
  81. |        Oh dear.... I've got the machine that goes '..Ping..'     |
  82. \------------------------------------------------------------------/
  83.  
  84.